<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page isELIgnored="false" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>修改员工信息</title>
</head>
<body>

<!-- 可以将table写在form表单中，因为form是块级元素 -->
<form action="${pageContext.servletContext.contextPath }/empupdate" method="post">
    <input type = "hidden" name="id" value="${emp.id}"/>
    <input type = "hidden" name="_method" value="put">
    <table>
        <tr>
            <th colspan="2">修改员工信息</th>
        </tr>
        <tr>
            <td>LASTNAME</td>
            <td>
                <input type="text" name="Name" value="${emp.name }"/>
            </td>
        </tr>

        <tr>
            <td>EMAIL</td>
            <td>
                <input type="text" name="age" value="${emp.age }"/>
            </td>
        </tr>
        <tr>
            <td>GENDER</td>
            <td>
                <input type="radio" name="sex" value="男" ${emp.sex=="男"?'checked':'' }/>男
                <input type="radio" name="sex" value="女" ${emp.sex=="女"?'checked':'' }/>女
            </td>
        </tr>
        <tr>
            <td>ADDRESS</td>
            <td>
                <input type="text" name="age" value="${emp.address}"/>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" value="update"/>
            </td>
        </tr>

    </table>
</form>

</body>
</html>